From: Paul Eggert Date: Sat, 4 Jun 2011 03:24:42 +0000 (-0700) Subject: * image.c (svg_load): Omit needless test. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~3528^2^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=dc39f9198d58ee5af5b147d3049d9c8be1c576d5;p=emacs.git * image.c (svg_load): Omit needless test. --- diff --git a/src/ChangeLog b/src/ChangeLog index d139d0b6f6a..8b368616120 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -18,8 +18,8 @@ Use ptrdiff_t, not int, for sizes. * image.c (slurp_file): Switch from int to ptrdiff_t. All uses changed. - (slurp_file, svg_load): Check that file size fits in both - size_t (for malloc) and ptrdiff_t (for sanity and safety). + (slurp_file): Check that file size fits in both size_t (for + malloc) and ptrdiff_t (for sanity and safety). 2011-06-03 Paul Eggert diff --git a/src/image.c b/src/image.c index ffc4f633c7a..a179568cb85 100644 --- a/src/image.c +++ b/src/image.c @@ -8073,7 +8073,7 @@ svg_load (struct frame *f, struct image *img) Lisp_Object data; data = image_spec_value (img->spec, QCdata, NULL); - if (! (STRINGP (data) && SBYTES (data) <= min (PTRDIFF_MAX, SIZE_MAX))) + if (!STRINGP (data)) { image_error ("Invalid image data `%s'", data, Qnil); return 0;